Software programs have been written to run sequentially since the beginning days of software development. In a sequential program, tasks execute one after another, i.e. one task finishes completely first before the next is begun, and if a previous task does not finish subsequent tasks do not execute. Steadily over time computers have become much more powerful, with more processing power and memory to handle advanced operations. This trend has recently shifted away from ever-increasing single-processor clock rates and towards an increase in the number of processors available in a single computer, i.e. away from sequential execution and toward parallel execution. Software developers want to take advantage of improvements in computer processing power, enabling their software programs to run faster as new hardware is adopted. With parallel hardware, however, this requires a different approach: developers must arrange for one or more tasks of a particular software program to be executed “concurrently” (sometimes called “in parallel”), so that the same logical operation can utilize many processors at one time, and deliver better performance as more processors are added to the computers on which such software runs.
Concurrent programs are fundamentally different than sequential ones, because many tasks happen at once instead of one after the other. This raises one particularly difficult problem: whereas in a sequential program, execution of a logical operation stops at the first occurrence of an exception, in concurrent programs exceptions may occur in many tasks at once. Current exception handling mechanisms assume linear, sequential execution, and so communicating such failures to the program presents problems. To make matters worse, the software developer is often working with an application programming interface that gives the appearance of a traditional sequential interface, even though its implementation runs work concurrently, which makes it increasingly difficult to encapsulate the implementation details of an interface when concurrency is used internally.